/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* 左侧导航样式 */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-header {
    padding: 20px;
    border-top: 1px solid #34495e;
    margin-top: auto;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: white;
    justify-content: center;
}

.user-icon {
    margin-right: 10px;
    font-size: 20px;
    color: white;
}

/* 菜单样式 */
.menu {
    list-style: none;
    padding-top: 0;
}

.menu-title {
    display: none;
}

.menu-item-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.menu-item-content {
    display: flex;
    align-items: center;
    color: white;
    width: 100%;
}

.dropdown-icon {
    transition: transform 0.3s ease;
}

.menu-item.active .dropdown-icon {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    padding-left: 20px;
    background-color: #34495e;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
}

.submenu.show {
    max-height: 200px;
}

.submenu-item {
    padding: 10px 15px;
    cursor: pointer;
    color: #bdc3c7;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.submenu-item .menu-icon {
    font-size: 12px;
}

.submenu-item:hover {
    color: white;
    background-color: #2c3e50;
}

/* 内容区域样式 */
.content {
    flex: 1;
    padding: 20px;
    background-color: white;
}

.content-header {
    padding: 20px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.content-body {
    padding: 20px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    color: #333 !important;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-primary { background-color: #007bff; color: white; }
.btn-success { background-color: #28a745; color: white; }
.btn-warning { background-color: #ffc107; color: #000; }
.btn-danger { background-color: #dc3545; color: white; }
.btn-secondary { background-color: #6c757d; color: white; }

/* 弹窗样式优化 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.view-container, .edit-container, .add-container {
    padding: 20px;
}

.detail-group {
    margin-bottom: 20px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.detail-group label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.detail-value {
    color: #333;
    padding: 12px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    min-height: 24px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: #80bdff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.button-group {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    color: #007bff;
    cursor: pointer;
    transition: color 0.3s;
    background: none;
    border: none;
    padding: 0;
}

.close-btn:hover {
    color: #0056b3;
}

/* 其他样式 */
.last-login {
    color: #bdc3c7;
    font-size: 12px;
    margin-top: 5px;
    text-align: center;
}

.search-box {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* 系统标题样式 */
.system-title {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #34495e;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2c3e50;
}

.system-title .logo {
    font-size: 24px;
    margin-right: 8px;
    background-color: white;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.system-title h1 {
    color: white;
    font-size: 18px;
    margin: 0;
    font-weight: bold;
    white-space: nowrap;
}

/* 菜单图标样式 */
.menu-icon {
    background-color: white;
    padding: 2px;
    border-radius: 3px;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* 修改菜单项样式 */
.menu-item {
    padding: 0;
}

/* 添加退出登录按钮的特殊样式 */
.menu-item[onclick*="logout"] {
    margin-top: 10px;
    padding-left: 15px;
}

.menu-item[onclick*="logout"] span {
    display: inline-flex;
    align-items: center;
    color: white;
}

.menu-item[onclick*="logout"] .menu-icon {
    margin-right: 8px;
    background-color: white;
    padding: 2px;
    border-radius: 3px;
    font-size: 14px;
}

/* 修改菜单内容样式 */
.menu-item-content {
    display: flex;
    align-items: center;
    color: white;
    width: 100%;
}

/* 修改图标样式 */
.menu-icon {
    background-color: white;
    padding: 2px;
    border-radius: 3px;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}